<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<h1>this is menu</h1>
<iframe src="http://localhost:18082/submenu.html" name="submenu" id="submenu" ></iframe>

<script type="text/javascript">
    window.onload=function(){
        var iframe = document.getElementById("submenu");
        iframe.contentWindow.postMessage("hello submenu","*");
    }

</script>
</body>
</html>